package com.muyu.danmo.service.impl;


import com.muyu.danmo.domain.DanmoGalleryWorkMaterial;
import com.muyu.danmo.mapper.DanmoGalleryWorkMaterialMapper;
import com.muyu.danmo.service.IDanmoGalleryWorkMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作品材质Service业务层处理
 *
 * @author yangle
 * @date 2024-10-23
 */
@Service
public class DanmoGalleryWorkMaterialServiceImpl implements IDanmoGalleryWorkMaterialService
{
    @Autowired
    private DanmoGalleryWorkMaterialMapper danmoGalleryWorkMaterialMapper;

    /**
     * 查询作品材质
     *
     * @param id 作品材质主键
     * @return 作品材质
     */
    @Override
    public DanmoGalleryWorkMaterial selectDanmoGalleryWorkMaterialById(Long id)
    {
        return danmoGalleryWorkMaterialMapper.selectDanmoGalleryWorkMaterialById(id);
    }

    /**
     * 查询作品材质列表
     *
     * @param danmoGalleryWorkMaterial 作品材质
     * @return 作品材质
     */
    @Override
    public List<DanmoGalleryWorkMaterial> selectDanmoGalleryWorkMaterialList(DanmoGalleryWorkMaterial danmoGalleryWorkMaterial)
    {
        return danmoGalleryWorkMaterialMapper.selectDanmoGalleryWorkMaterialList(danmoGalleryWorkMaterial);
    }

    /**
     * 新增作品材质
     *
     * @param danmoGalleryWorkMaterial 作品材质
     * @return 结果
     */
    @Override
    public int insertDanmoGalleryWorkMaterial(DanmoGalleryWorkMaterial danmoGalleryWorkMaterial)
    {
        return danmoGalleryWorkMaterialMapper.insertDanmoGalleryWorkMaterial(danmoGalleryWorkMaterial);
    }

    /**
     * 修改作品材质
     *
     * @param danmoGalleryWorkMaterial 作品材质
     * @return 结果
     */
    @Override
    public int updateDanmoGalleryWorkMaterial(DanmoGalleryWorkMaterial danmoGalleryWorkMaterial)
    {
        return danmoGalleryWorkMaterialMapper.updateDanmoGalleryWorkMaterial(danmoGalleryWorkMaterial);
    }

    /**
     * 批量删除作品材质
     *
     * @param ids 需要删除的作品材质主键
     * @return 结果
     */
    @Override
    public int deleteDanmoGalleryWorkMaterialByIds(Long[] ids)
    {
        return danmoGalleryWorkMaterialMapper.deleteDanmoGalleryWorkMaterialByIds(ids);
    }

    /**
     * 删除作品材质信息
     *
     * @param id 作品材质主键
     * @return 结果
     */
    @Override
    public int deleteDanmoGalleryWorkMaterialById(Long id)
    {
        return danmoGalleryWorkMaterialMapper.deleteDanmoGalleryWorkMaterialById(id);
    }
}
